﻿namespace DeHeng_Mes.Constant
{

    /// <summary>
    /// 系统常量
    /// </summary>
    class SystemConstant
    {

        #region 类名匹配常量

        public const string Code = "Code";
        public const string DeviceErrorMessage = "DeviceErrorMessage";
        public const string StationStatus = "StationStatus";
        public const string Power = "Power";
        public const string ProduceOperation = "ProduceOperation";
        public const string ProduceOrder = "ProduceOrder";
        public const string StationError = "StationError";
        public const string Beat = "Beat";
        public const string DeviceErrorStatus = "DeviceErrorStatus";
        public const string Collection = "Collection";
        public const string ProduceStatus = "ProduceStatus";
        public const string CodeHelper = "CodeHelper";
        public const string IssuedCode = "IssuedCode";

        #endregion

        #region 线体名称匹配常量

        public const string Left = "left";
        public const string Right = "right";
        public const string Small = "small";
        public const string StudWeld = "studWeld";
        public const string Fds = "fds";

        #endregion

        #region 订单状态常量
        public const string Ok = "1";
        public const string nOk = "2";
        public const string nCreate = "0";
        public const string illegal = "-1";
        #endregion

        #region 数据采集状态常量
        public const string InsertTableIllegal = "2";
        public const string dataNotCreate = "0";
        public const string InsertDataIllegal = "1";
        #endregion

        #region 订单状态常量
        public const string DeviceOk = "2";
        public const string DeviceNOk = "1";
        #endregion

        #region db块
        public const int Write = 6005;
        public const int Hart = 6011;
        public const int Order = 6008;
        public const int GetCode = 6014;
        #endregion

        #region 数采错误数据保存天数限制
        public const int errorDay = 1;
        #endregion

        #region DB块常量
        public const int DB6000 = 6000;
        public const int DB6001 = 6001;
        public const int DB6002 = 6002;
        public const int DB6003 = 6003;
        public const int DB6004 = 6004;
        public const int DB6005 = 6005;
        public const int DB6006 = 6006;
        public const int DB6007 = 6007;
        public const int DB6008 = 6008;
        public const int DB6009 = 6009;
        public const int DB6010 = 6010;
        public const int DB6011 = 6011;
        public const int DB6012 = 6012;
        public const int DB6013 = 6013;
        public const int DB6014 = 6014;
        public const int DB6015 = 6015;
        #endregion

        #region 工单相关偏移量与DB
        public const int ORDER_DB = 6000;
        public const int ORDER_ID_OFF = 0;
        public const int ORDER_PRODUCENUM_OFF = 256;
        public const int ORDER_MATERIALCODE_OFF = 258;
        public const int ORDER_STATUS_OFF = 514;


        public const int ORDER_CARTEPY_OFF = 256;
        public const int ORDER_PLCSTARTWORK_OFF = 512;
        public const int ORDER_ORDEREND_OFF = 512;
        public const int ORDER_PLCENDWORK_OFF = 512;
        public const int ORDER_ORDERSAVE_OFF = 512;
        public const int ORDER_PLCSTARTWORK_BIT = 512;
        public const int ORDER_ORDEREND_BIT = 512;
        public const int ORDER_PLCENDWORK_BIT = 512;
        public const int ORDER_ORDERSAVE_BIT = 512;
        #endregion

        #region 物料编码通用字段
        public const string AUTO_P6_MATERIALID = "100101000086";
        #endregion

        #region 字段名调用字符串常量
        public const string CLINCHOP10 = "OP10";


        public const string CLINCH_1 = "S01R";
        public const string RIVETE_1 = "S02";
        public const string RIVETE_2 = "S03";
        public const string RIVETE_3 = "S04";
        public const string RIVETE_4 = "S05";
        public const string OP10 = "Op10";
        public const string OP20 = "Op20";
        public const string OP25 = "Op25";
        public const string OP30 = "Op30";
        public const string OP40 = "Op40";
        public const string NgStation = "NgStation";

        public const string STATION = "Station";
        public const string BATCH = "Batch";
        public const string TYPE = "Type";
        public const string WORKER = "Worker";
        public const string RBNO = "RBNo";
        public const string CODE1 = "Code1";
        public const string CODE2 = "Code2";
        public const string CODE3 = "Code3";
        public const string CODE4 = "Code4";
        public const string STARTTIME = "StartTime";
        public const string ENDTIME = "EndTime";
        public const string BEAT = "Beat";
        public const string RESULT = "Result";
        #endregion

        #region 数组数据读取常量
        public const int ALL_STARTOFF = 0;

        public const int PLC06_STATUS_DB = 5000;
        public const int PLC06_STATUS_STARTOFF = 0;
        public const int PLC06_STATUS_ENDOFF = 300;

        public const int PLC06_RETURNSTATUS_DB = 5001;
        public const int PLC06_RETURNSTATUS_STARTOFF = 0;
        public const int PLC06_RETURNSTATUS_ENDOFF = 116;

        public const int PLC06_CCD_DB = 5080;
        public const int PLC06_CCD_STARTOFF = 0;
        public const int PLC06_CCD_ENDOFF = 877;

        public const int PLC06_WELD_DB = 5010;
        public const int PLC06_WELD_STARTOFF = 0;
        public const int PLC06_WELD_ENDOFF = 13212;

        public const int PLC06_WELDVISION_DB = 5020;
        public const int PLC06_WELDVISION_STARTOFF = 0;
        public const int PLC06_WELDVISION_ENDOFF = 382;

        public const int PLC06_POINT_DB = 5020;
        public const int PLC06_POINT_STARTOFF = 0;
        public const int PLC06_POINT_ENDOFF = 194;
        #endregion
    }
}
